package com.example.binder;

import android.os.IBinder;
import android.os.RemoteException;

public class TestServiceProxy implements ITestService {
    private IBinder mRemote;

    public TestServiceProxy(IBinder remote) {
        mRemote = remote;
    }

    @Override
    public int test(int flag) throws RemoteException {
        android.os.Parcel _data = android.os.Parcel.obtain();
        android.os.Parcel _reply = android.os.Parcel.obtain();
        int _result;
        try {
            _data.writeInterfaceToken(DESCRIPTOR);
            _data.writeInt(flag);
            mRemote.transact(TRANSACTION_test, _data, _reply, 0);
            _reply.readException();
            _result = _reply.readInt();
        } finally {
            _reply.recycle();
            _data.recycle();
        }
        return _result;
    }
}
